-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add suport for list/get/run/stop task #153
base: main
Are you sure you want to change the base?
Conversation
ID string `json:"id"` | ||
Name string `json:"name"` | ||
Type string `json:"type"` | ||
Message *string `json:"message"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Message *string `json:"message"` | |
Message *string `json:"message,omitempty"` |
Type string `json:"type"` | ||
Message *string `json:"message"` | ||
CurrentState string `json:"currentState` | ||
LastRunResult *string `json:"lastRunResult` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LastRunResult *string `json:"lastRunResult` | |
LastRunResult *string `json:"lastRunResult,omitempty"` |
Message *string `json:"message"` | ||
CurrentState string `json:"currentState` | ||
LastRunResult *string `json:"lastRunResult` | ||
NextRun *string `json:"nextRun"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NextRun *string `json:"nextRun"` | |
NextRun *string `json:"nextRun,omitempty"` |
CurrentState string `json:"currentState` | ||
LastRunResult *string `json:"lastRunResult` | ||
NextRun *string `json:"nextRun"` | ||
LastRun *string `json:"lastRun"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LastRun *string `json:"lastRun"` | |
LastRun *string `json:"lastRun,omitempty"` |
|
||
type PaginationResult[T any] struct { | ||
Items []T `json:"items"` | ||
ContinuationToken *string `json:"continuationToken"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ContinuationToken *string `json:"continuationToken"` | |
ContinuationToken *string `json:"continuationToken,omitempty"` |
if len(tasks) > 0 { | ||
task, err := s.GetTask(tasks[0].ID) | ||
if err != nil { | ||
assert.Failf(t, "fail to run task", err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why fail tu run task? you onle get the task and don't run them
pleas test run and stop functions |
https://help.sonatype.com/en/tasks-api.html